FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"

SRC_URI:append = " \
    file://phytium-powerctrl.sh \
    "
SRC_URI:append = " \
    file://update-host-state.sh \
    file://update-state.service \
    "
    
RDEPENDS:${PN} += "bash"
do_install:append() {
	install -m 0755 ${WORKDIR}/phytium-powerctrl.sh ${D}${bindir}/
	install -m 0755 ${WORKDIR}/update-host-state.sh ${D}${bindir}/
    install -m 0644 ${WORKDIR}/update-state.service ${D}${systemd_system_unitdir}
}

SYSTEMD_SERVICE:${PN} += " update-state.service "

FILES:${PN} += "${bindir}/phytium-powerctrl.sh "
FILES:${PN} += "${bindir}/update-host-state.sh "
